Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import-boss reverse import #83526

Merged
merged 5 commits into from Jan 29, 2020

Conversation

eloyekunle
Copy link
Contributor

@eloyekunle eloyekunle commented Oct 5, 2019

What type of PR is this?

/kind feature

What this PR does / why we need it:
This PR adds reverse import restrictions for packages by import-boss.

Reverse import restrictions help to define which packages in k/k can import certain other packages, defined inside the latter. This allows to have fine-grained import restrictions for "private packages" where we don't want to spread use inside of k/k.

The import-restrictions files added here specify that the apiextensions-apiserver package (and subpackages, except v1 and v1beta1) should only be used in apiserver, and not anywhere else.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
Ref: kubernetes/gengo#154

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/sig api-machinery

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 5, 2019
@k8s-ci-robot k8s-ci-robot added area/code-generation kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Oct 5, 2019
@eloyekunle
Copy link
Contributor Author

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. area/dependency Issues or PRs related to dependency changes sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. area/apiserver area/cloudprovider area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 5, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 5, 2019
@eloyekunle
Copy link
Contributor Author

/cc @sttts

@eloyekunle
Copy link
Contributor Author

ping @liggitt

@eloyekunle eloyekunle changed the title WIP: import-boss reverse import import-boss reverse import Jan 28, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 28, 2020
"google.golang.org/api/tpu/v1",
"golang.org/x/net/context",
"google.golang.org/grpc"
]
Copy link
Contributor

@sttts sttts Jan 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these removals look good to me. This is not the intended use of import-boss.

"k8s.io/utils/path",
"k8s.io/utils/strings"
]
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. k8s.io/utils is not a staging repo and we should not restrict use.

@sttts
Copy link
Contributor

sttts commented Jan 28, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jan 28, 2020
@sttts
Copy link
Contributor

sttts commented Jan 28, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2020
@fejta-bot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2020
Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@@ -109,7 +108,7 @@ func NewClusterAuthenticationTrustController(requiredAuthenticationData ClusterA
return cast.Name == configMapName
}
if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok {
if cast, ok := tombstone.Obj.(*apiextensions.CustomResourceDefinition); ok {
if cast, ok := tombstone.Obj.(*corev1.ConfigMap); ok {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's exciting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very exciting 😁

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eloyekunle, liggitt, sttts

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2020
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jan 29, 2020

@eloyekunle: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce-iscsi 6aeee39bb9a5c899ff47f32c43a4c7ba1cf2fbb5 link /test pull-kubernetes-e2e-gce-iscsi
pull-kubernetes-e2e-gce-alpha-features 6aeee39bb9a5c899ff47f32c43a4c7ba1cf2fbb5 link /test pull-kubernetes-e2e-gce-alpha-features
pull-kubernetes-e2e-gci-gce-autoscaling 6aeee39bb9a5c899ff47f32c43a4c7ba1cf2fbb5 link /test pull-kubernetes-e2e-gci-gce-autoscaling

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@eloyekunle
Copy link
Contributor Author

eloyekunle commented Jan 29, 2020 via email

@k8s-ci-robot k8s-ci-robot merged commit f5a0087 into kubernetes:master Jan 29, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Jan 29, 2020
@eloyekunle eloyekunle deleted the feat/gengo-reverse-import branch February 5, 2020 10:39
@liggitt liggitt removed the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Feb 18, 2020
wking pushed a commit to wking/kubernetes that referenced this pull request Jul 21, 2020
…e-import

import-boss reverse import

Kubernetes-commit: f5a0087
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubeadm area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants